package cn.wyu.service;

import cn.wyu.dao.ArticleDao;
import cn.wyu.dao.ArticleDaoImpl;
import cn.wyu.pojo.Article;

import java.util.List;

public class ArticleServletImpl implements ArticleService {
    private ArticleDao id = new ArticleDaoImpl();
    @Override
    public List<Article> findByCodeType(String type_code) {
        List<Article> list = id.findByTypeCode(type_code);
        return list;
    }

    @Override
    public Article findByArticleID(String articleID) {
        //将id提交给dao层
        ArticleDao ad = new ArticleDaoImpl();
        Article at = ad.findByArticleID(articleID);

        return at;
    }
}
